package ZuCheXitong;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int days;
        Scanner in=new Scanner(System.in);
        System.out.println("车型如下:");
        System.out.println("1.轿车");
        System.out.println("2.客车");
        System.out.println("请选择:");
        int n=in.nextInt();
        switch (n){
            case 1:
                System.out.println("请选择轿车的品牌:");
                System.out.println("1.宝马");
                System.out.println("2.别克");
                System.out.println("请选择:");
                n=in.nextInt();
                switch (n){
                    case 1:
                        System.out.println("800元/天");
                        break;
                    case 2:
                        System.out.println("200元/天");
                        break;
                }
                System.out.println("请输入租赁天数:");
                days=in.nextInt();
                if (n==1){
                    baoma a=new baoma("red",days);
                    double sum=a.Sum();
                    System.out.println("总计："+sum+"元");
                }
                if (n==2){
                    bieke b=new bieke("red",days);
                    double sum=b.Sum();
                    System.out.println("总计："+sum+"元");
                }
                break;
            case 2:
                System.out.println("请选择客车的座位数:");
                System.out.println("1.15坐以下");
                System.out.println("2.15坐以上");
                System.out.println("请选择:");
                n=in.nextInt();
                switch (n){
                    case 1:
                        System.out.println("500元/天");
                        break;
                    case 2:
                        System.out.println("1200元/天");
                        break;
                }
                System.out.println("请输入租赁天数:");
                days=in.nextInt();
                if (n==1){
                    Fiveyixia c=new Fiveyixia("white",days);
                    double sum=c.Sum();
                    System.out.println("总计："+sum+"元");
                }
                if (n == 2) {
                    Fiveyishang d=new Fiveyishang("white",days);
                    double sum=d.Sum();
                    System.out.println("总计："+sum+"元");
                }
                break;
        }
    }
}
